package com.demo.resourcecode.c14boot;

import java.net.URL;

import org.springframework.boot.loader.LaunchedURLClassLoader;
import org.springframework.boot.loader.jar.JarFile;

public class JarLauncherTest3 {

	public static void main(String[] args) throws Exception {
		try {
            JarFile.registerUrlProtocolHandler();
            LaunchedURLClassLoader classLoader = new LaunchedURLClassLoader(
                new URL[] {
                	new URL("jar:file:/D:/workspace-my/spring_resource_demo/target/classes/BOOT-INF/lib/jarloader.jar!/lib/medusa-api-1.2.4-RELEASE.jar!/")
                },
                JarLauncherTest3.class.getClassLoader());

            System.out.println(classLoader.loadClass("com.ziroom.common.api.helper.AopTargetInnerUtil"));
        } catch (Exception e) {
            e.printStackTrace();
        }
	}

}
